<?php

namespace App\Controller;

use App\Service\Adolescent\CheckAdolescentService;
use App\Service\Adolescent\CloseAdolescentService;
use App\Service\Adolescent\ForgetAdolescentService;
use App\Service\Adolescent\SettingAdolescentService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Middleware\JTAuthMiddleware;

/**
 * @Controller(prefix="adolescent")
 */
class AdolescentController extends AbstractController
{
    /**
     * 关闭青少年模式
     * @RequestMapping(path="pattern/close", methods="post")
     * @Middleware(JTAuthMiddleware::class))
     */
    public function closePattern(CloseAdolescentService $service)
    {
        return $service->response();
    }

    /**
     * 设置青少年模式（开启）
     * @RequestMapping(path="pattern/setting", methods="post")
     * @Middleware(JTAuthMiddleware::class))
     */
    public function settingPattern(SettingAdolescentService $service)
    {
        return $service->response();
    }

    /**
     * 忘记青少年密码
     * @RequestMapping(path="pattern/forget", methods="post")
     * @Middleware(JTAuthMiddleware::class))
     */
    public function forgetPattern(ForgetAdolescentService $service)
    {
        return $service->response();
    }

    /**
     * 是否打开青少年模式
     * @RequestMapping(path="pattern/check", methods="post")
     * @Middleware(JTAuthMiddleware::class))
     */
    public function checkPattern(CheckAdolescentService $service)
    {
        return $service->response();
    }
}